#include <stdio.h>

int main() {
    int h,m,k;
    scanf("%d:%d %d",&h,&m,&k);
    h = ((k+m)/60+h)%24;
    m = (k+m)%60;
    printf("%02d:%02d",h,m);
    return 0;
}